package com.zkingsoft.pojo;

import java.io.IOException;
import java.io.StringWriter;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

/**
 * 
 * @Description: 自定义功能权限标签
 * @author:姜友瑶
 * @date 2016年8月28日
 */
public class UserFnPwoerTag extends SimpleTagSupport {

	private UserPwoer userPwoer;
	private String value;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	StringWriter sw = new StringWriter();

	public void doTag() throws JspException, IOException {
		userPwoer = (UserPwoer) getJspContext().getAttribute("userPwoer");
		if (userPwoer.getPathPowers().get(value) != null) {
			getJspBody().invoke(sw);
			getJspContext().getOut().println(sw.toString());
		}
	}

}
